package sim.ring.tower;

import java.util.EventObject;

import sim.ring.technical.TechnicalManager;
import sim.ring.technical.comms.EventListenerInterface;
import sim.ring.technical.comms.SerialEvent;

public class BellEventListener implements EventListenerInterface {

	
	public void handle(EventObject e) {
		if(e instanceof SerialEvent) {
			SerialEvent se = (SerialEvent)e;
			//TODO: add code to ring bell properly.. following is jsut a test
			String bell = se.getBell();
			TechnicalManager.getInstance().playSound("bin/"+bell+".wav");
		} else {
			//TODO: event type not handled, do something
		}
	}

}
